package com.tender.utils;

public class UserProvider {

    private static final ThreadLocal<LoginUser> USER_CACHE = new ThreadLocal<>();

    public static void setUserInfo(LoginUser userInfo) {
        USER_CACHE.set(userInfo);
    }

    public static LoginUser getUserInfo() {
        return USER_CACHE.get();
    }

    public static void clear() {
        USER_CACHE.remove();
    }

}
